package com.creator.builder;

/**
 * <p></p>
 *
 * @author jiuhua.xu
 * @version 1.0
 * @since JDK 1.8
 */
public class TextBuilder extends Builder {

    private StringBuilder sb = new StringBuilder();

    @Override
    void makeTitle(String title) {
        sb.append("=========\n");
        sb.append(title + "\n");
    }

    @Override
    void makeString(String str) {
        sb.append(str + "\n");
    }

    @Override
    void close() {
        sb.append("=========\n");
    }

    @Override
    public String getResult() {
        return sb.toString();
    }
}
